package cn.juque.common.thread;

import cn.hutool.core.thread.ThreadUtil;
import cn.juque.common.base.BaseOperator;

/**
 * @author nuoka
 * @version 1.0.0
 * <li></li>
 * @date 2022/3/12 21:00
 **/
public class BaseOperatorThreadLocal {

    private static ThreadLocal<BaseOperator> threadLocal = ThreadUtil.createThreadLocal(true);

    public void set(BaseOperator baseOperator) {
        threadLocal.set(baseOperator);
    }

    public BaseOperator get() {
        return threadLocal.get();
    }

    public void remove() {
        threadLocal.remove();
    }
}
